home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
win_utl2
/
pspa370a.zip
/
EXAMPL02.POM
< prev
next >
Wrap
Text File
|
1996-04-26
|
1KB
|
54 lines
;
; Ignore lines that are less than 85 characters long
;
MINLEN "85"
;
; Ignore lines that contain extraneous information ("^" means "contains")
;
IGNORE $FLINE ^ "Date: "
IGNORE $FLINE ^ "Order Expected"
IGNORE $FLINE ^ "Date Ship Date"
IGNORE $FLINE ^ "Item number/Description"
;
; Change double-quotes (the " character) to single-quotes (').
;
CHANGE $FLINE """" "'"
;
; Determine where we are
;
IF $FLINE[8] = " " THEN ItemCounter = ItemCounter+ ELSE "0"
;
; Set variables
;
BEGIN ItemCounter = "0"
SET ReferenceNum = $FLINE[ 1 8]
SET CustomerCode = $FLINE[ 10 15]
SET CustomerDesc = $FLINE[ 17 47]
SET OrderDate = $FLINE[ 49 57]
TRIM ReferenceNum "B" " "
TRIM CustomerCode "B" " "
TRIM CustomerDesc "B" " "
TRIM OrderDate "B" " "
END
BEGIN ItemCounter = "1"
SET Price = $FLINE[105 114]
SET Quantity = $FLINE[ 76 86]
SET PartNumber = $FLINE[ 10 32]
TRIM Price "B" " "
TRIM Price "A" ","
TRIM Quantity "B" " "
TRIM PartNumber "B" " "
IF Price = "" THEN Price = "0.00"
IF Quantity = "" THEN Quantity = "0"
END
BEGIN ItemCounter = "2"
SET Description = $FLINE[ 10 43]
TRIM Description "B" " "
OUT |"{ReferenceNum}","{CustomerCode}",
OUT |{Price},{Quantity},"{PartNumber}",
OUTEND |"{Description}"
SET ItemCounter = "0"
END